package com.cinyi.ormx.android.dao;

import android.content.Context;

import com.cinyi.ormlite.core.BaseModel;
import com.cinyi.ormlite.dao.AbstractGenericDaoImpl;
import com.cinyi.ormx.android.context.OrmxContext;

/**
 * 泛型DAO的JDBC实现
 * @author penghui
 * @param <T>
 */
@SuppressWarnings("rawtypes")
public class AndroidGenericDaoImpl<T extends BaseModel> extends AbstractGenericDaoImpl<T> {
	private DefaultSQLiteHelper db = null ;
	
	public AndroidGenericDaoImpl(Context context){
		this.db = ((OrmxContext)context.getApplicationContext()).getSQLiteHelper() ;
		AndroidDatabaseAdapter<T> adapter = new AndroidDatabaseAdapter<T>(db);
		setDatabaseAdapter(adapter);
	}
	
	@Override
	public void close(){
	}

}
